package com.bite.lesson2;

public class Demo_02 {
    public static void main(String[] args) throws InterruptedException {
        Thread[] threads = new Thread[20];
        for (int i = 0; i < threads.length; i++) {
            int n = i;
            threads[i] = new Thread(() -> {
                System.out.println(n);
            });

        }
        for(Thread t : threads) {
            t.start();

        }
    }
}
